
<h1><span class="yiyi-st" id="yiyi-12">numpy.fv</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.fv.html">https://docs.scipy.org/doc/numpy/reference/generated/numpy.fv.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<dl class="function">
<dt id="numpy.fv"><span class="yiyi-st" id="yiyi-13"> <code class="descclassname">numpy.</code><code class="descname">fv</code><span class="sig-paren">(</span><em>rate</em>, <em>nper</em>, <em>pmt</em>, <em>pv</em>, <em>when=&apos;end&apos;</em><span class="sig-paren">)</span><a class="reference external" href="http://github.com/numpy/numpy/blob/v1.11.3/numpy/lib/financial.py#L36-L124"><span class="viewcode-link">[source]</span></a></span></dt>
<dd><p><span class="yiyi-st" id="yiyi-14">计算未来值。</span></p>
<dl class="docutils">
<dt><span class="yiyi-st" id="yiyi-15">给定：</span></dt>
<dd><ul class="first last simple">
<li><span class="yiyi-st" id="yiyi-16">当前值<a class="reference internal" href="numpy.pv.html#numpy.pv" title="numpy.pv"><code class="xref py py-obj docutils literal"><span class="pre">pv</span></code></a></span></li>
<li><span class="yiyi-st" id="yiyi-17">每个期间复利一次利息<a class="reference internal" href="numpy.rate.html#numpy.rate" title="numpy.rate"><code class="xref py py-obj docutils literal"><span class="pre">rate</span></code></a>，其中有</span></li>
<li><span class="yiyi-st" id="yiyi-18"><a class="reference internal" href="numpy.nper.html#numpy.nper" title="numpy.nper"><code class="xref py py-obj docutils literal"><span class="pre">nper</span></code></a>总计</span></li>
<li><span class="yiyi-st" id="yiyi-19">（固定）付款，<a class="reference internal" href="numpy.pmt.html#numpy.pmt" title="numpy.pmt"><code class="xref py py-obj docutils literal"><span class="pre">pmt</span></code></a>，付款</span></li>
<li><span class="yiyi-st" id="yiyi-20">每个周期开始时（<em class="xref py py-obj">时</em> = {&apos;begin&apos;，1}）或结束（<em class="xref py py-obj">时</em> = {&apos;end&apos;，0}</span></li>
</ul>
</dd>
<dt><span class="yiyi-st" id="yiyi-21">返回：</span></dt>
<dd><span class="yiyi-st" id="yiyi-22">在<a class="reference internal" href="numpy.nper.html#numpy.nper" title="numpy.nper"><code class="xref py py-obj docutils literal"><span class="pre">nper</span></code></a>周期结束时的值</span></dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name">
<col class="field-body">
<tbody valign="top">
<tr class="field-odd field"><th class="field-name"><span class="yiyi-st" id="yiyi-23">参数：</span></th><td class="field-body"><p class="first"><span class="yiyi-st" id="yiyi-24"><strong>rate</strong>：标量或array_like的形状（M，）</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-25">利率作为十进制（不是百分比）每期</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-26"><strong>nper</strong>：标量或array_like的形状（M，）</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-27">复合周期数</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-28"><strong>pmt</strong>：标量或array_like形状（M，）</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-29">付款</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-30"><strong>pv</strong>：形状（M，）的标量或数组类</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-31">目前价值</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-32"><strong>时</strong>：{{&apos;begin&apos;，1}，{&apos;end&apos;，0}}，{string，int}</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-33">付款到期时（“开始”（1）或“结束”（0））。</span><span class="yiyi-st" id="yiyi-34">默认为{&apos;end&apos;，0}。</span></p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name"><span class="yiyi-st" id="yiyi-35">返回：</span></th><td class="field-body"><p class="first"><span class="yiyi-st" id="yiyi-36"><strong>out</strong>：ndarray</span></p>
<blockquote class="last">
<div><p><span class="yiyi-st" id="yiyi-37">未来价值。</span><span class="yiyi-st" id="yiyi-38">如果所有输入是标量，则返回标量浮点。</span><span class="yiyi-st" id="yiyi-39">如果任何输入是array_like，则返回每个输入元素的未来值。</span><span class="yiyi-st" id="yiyi-40">如果多个输入是array_like，它们都必须具有相同的形状。</span></p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric"><span class="yiyi-st" id="yiyi-41">笔记</span></p>
<p><span class="yiyi-st" id="yiyi-42">未来值通过求解以下等式计算：</span></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fv</span> <span class="o">+</span>
<span class="n">pv</span><span class="o">*</span><span class="p">(</span><span class="mi">1</span><span class="o">+</span><span class="n">rate</span><span class="p">)</span><span class="o">**</span><span class="n">nper</span> <span class="o">+</span>
<span class="n">pmt</span><span class="o">*</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">rate</span><span class="o">*</span><span class="n">when</span><span class="p">)</span><span class="o">/</span><span class="n">rate</span><span class="o">*</span><span class="p">((</span><span class="mi">1</span> <span class="o">+</span> <span class="n">rate</span><span class="p">)</span><span class="o">**</span><span class="n">nper</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span>
</pre></div>
</div>
<p><span class="yiyi-st" id="yiyi-43">或<code class="docutils literal"><span class="pre">费率</span> <span class="pre">==</span> <span class="pre">0</span></code>：</span></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fv</span> <span class="o">+</span> <span class="n">pv</span> <span class="o">+</span> <span class="n">pmt</span> <span class="o">*</span> <span class="n">nper</span> <span class="o">==</span> <span class="mi">0</span>
</pre></div>
</div>
<p class="rubric"><span class="yiyi-st" id="yiyi-44">参考文献</span></p>
<table class="docutils citation" frame="void" id="wrw" rules="none">
<colgroup><col class="label"><col></colgroup>
<tbody valign="top">
<tr><td class="label"><span class="yiyi-st" id="yiyi-45"><a class="fn-backref" href="#id1">[WRW]</a></span></td><td><span class="yiyi-st" id="yiyi-46">Wheeler，D.A.，E.Rathke和R.Weir（Eds。）</span><span class="yiyi-st" id="yiyi-47">（2009年5月）。</span><span class="yiyi-st" id="yiyi-48">Office应用程序的打开文档格式（OpenDocument）v1.2，第2部分：重新计算公式（OpenFormula）格式 - 注释版本，预稿12。</span><span class="yiyi-st" id="yiyi-49">促进结构性信息标准组织（OASIS）。</span><span class="yiyi-st" id="yiyi-50">Billerica，MA，USA。</span><span class="yiyi-st" id="yiyi-51">[ODT文件]。</span><span class="yiyi-st" id="yiyi-52">可用：<a class="reference external" href="http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula">http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula</a> OpenDocument-formula-20090508.odt</span></td></tr>
</tbody>
</table>
<p class="rubric"><span class="yiyi-st" id="yiyi-53">例子</span></p>
<p><span class="yiyi-st" id="yiyi-54">10年后现在节省100美元的未来价值是多少，每月节省100美元。</span><span class="yiyi-st" id="yiyi-55">假设利率是每月5％（每年）复利？</span></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">np</span><span class="o">.</span><span class="n">fv</span><span class="p">(</span><span class="mf">0.05</span><span class="o">/</span><span class="mi">12</span><span class="p">,</span> <span class="mi">10</span><span class="o">*</span><span class="mi">12</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="go">15692.928894335748</span>
</pre></div>
</div>
<p><span class="yiyi-st" id="yiyi-56">按照惯例，负号表示现金流出（即今天不可用的货币）。</span><span class="yiyi-st" id="yiyi-57">因此，按每年5％的利率每月节省100美元，就可以在10年内花费15,692.93美元。</span></p>
<p><span class="yiyi-st" id="yiyi-58">如果任何输入是array_like，返回一个相等形状的数组。</span><span class="yiyi-st" id="yiyi-59">让我们比较上面的例子中的不同利率。</span></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">((</span><span class="mf">0.05</span><span class="p">,</span> <span class="mf">0.06</span><span class="p">,</span> <span class="mf">0.07</span><span class="p">))</span><span class="o">/</span><span class="mi">12</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">np</span><span class="o">.</span><span class="n">fv</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="mi">10</span><span class="o">*</span><span class="mi">12</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="go">array([ 15692.92889434,  16569.87435405,  17509.44688102])</span>
</pre></div>
</div>
</dd></dl>
